const getPartnerInfoRecord = require("./getPartnerInfoRecord/index");
const getPartnerInfoDetail = require("./getPartnerInfoDetail/index");
const exportPartnerInfoRecord = require("./exportPartnerInfoRecord/index");
const getPartnerConsumeRecord = require("./getPartnerConsumeRecord/index");
const getPartnerConsumeDetail = require("./getPartnerConsumeDetail/index");
const exportPartnerConsumeRecord = require("./exportPartnerConsumeRecord/index");
const getPartnerDiscountRecord = require("./getPartnerDiscountRecord/index");
const getPartnerDiscountDetail = require("./getPartnerDiscountDetail/index");
const exportPartnerDiscountRecord = require("./exportPartnerDiscountRecord/index");
const getPartnerCouponRecord = require("./getPartnerCouponRecord/index");
const getPartnerCouponDetail = require("./getPartnerCouponDetail/index");
const exportPartnerCouponRecord = require("./exportPartnerCouponRecord/index");
const getCouponChart = require("./getCouponChart/index");

// 云函数入口函数
exports.main = async (event, context) => {
    switch (event.type) {
        case "getPartnerInfoRecord":
            return await getPartnerInfoRecord.main(event, context);
        case "getPartnerInfoDetail":
            return await getPartnerInfoDetail.main(event, context);
        case "exportPartnerInfoRecord":
            return await exportPartnerInfoRecord.main(event, context);
        case "getPartnerConsumeRecord":
            return await getPartnerConsumeRecord.main(event, context);
        case "getPartnerConsumeDetail":
            return await getPartnerConsumeDetail.main(event, context);
        case "exportPartnerConsumeRecord":
            return await exportPartnerConsumeRecord.main(event, context);
        case "getPartnerDiscountRecord":
            return await getPartnerDiscountRecord.main(event, context);
        case "getPartnerDiscountDetail":
            return await getPartnerDiscountDetail.main(event, context);
        case "exportPartnerDiscountRecord":
            return await exportPartnerDiscountRecord.main(event, context);
        case "getPartnerCouponRecord":
            return await getPartnerCouponRecord.main(event, context);
        case "getPartnerCouponDetail":
            return await getPartnerCouponDetail.main(event, context);
        case "exportPartnerCouponRecord":
            return await exportPartnerCouponRecord.main(event, context);
        case "getCouponChart":
            return await getCouponChart.main(event, context);
    }
};